package cn.fudan.pms.service;

import cn.fudan.pms.domain.po.Equipment;

import java.util.Date;

/**
 * @author Jerry Zhang
 * create: 2022-12-27 21:28
 */
public interface JobService {
    /**
     * 调度员调用此接口
     * 将报修信息录入系统
     *
     * @param title
     * @param description
     * @param residentUuid
     * @param platform
     */
    String addNewJob(String title, String description, String residentUuid, String platform, String reporterUuid);


    /**
     * 调度员调用此接口
     * 将报修单分配给合适的维修工
     *
     * @param jobUuid
     * @param subUuid
     * @param reporterUuid
     * @param title
     * @param description
     * @param equipment
     */
    String assignJob(String jobUuid, String subUuid, String reporterUuid, String title, String description, Equipment equipment);

    /**
     * 重新调度
     * @param jobUuid
     * @param reporterUuid
     * @param title
     * @param description
     * @param equipment
     * @return
     */
    String reAssignJob(String jobUuid, String reporterUuid, String title, String description, Equipment equipment);

    /**
     * 维修完成时更新报修状态
     * @param jobUuid
     * @param subUuid
     * @return
     */
    void done(String jobUuid, String subUuid);

    /**
     * 维修工调用此接口
     * 添加单次维修记录
     *
     * @param jobUuid
     * @param subUuid
     * @param startTime
     * @param endTime
     * @param content
     */
    String addRecord(String jobUuid, String subUuid, Date startTime, Date endTime, String content);
}
